home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperHackers.cpt / Hyper-Hackers Queue 1.0 / background_3797.txt < prev    next >
Text File  |  1989-02-26  |  15KB  |  610 lines

  1. -- background: 3797 from stack: in.0
  2. -- bmap block id: 9187
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   show field 1
  9.   show field 2
  10. end openCard
  11.  
  12. on closeCard
  13.   if (the number of this card is not 1) then
  14.     set the lockScreen to true
  15.     hide background field 1
  16.   end if
  17.   pass closeCard
  18. end closeCard
  19.  
  20.  
  21.  
  22. -- part 1 (field)
  23. -- low flags: 80
  24. -- high flags: 2007
  25. -- rect: left=35 top=54 right=304 bottom=499
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 3
  30. -- text size: 9
  31. -- style flags: 0
  32. -- line height: 12
  33. -- part name: body
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   if selection is empty then
  37.     repeat two times
  38.       click at the clickLoc
  39.     end repeat
  40.     put the selection into holder
  41.     push card
  42.     visual effect wipe right to black
  43.     visual effect wipe left
  44.     find holder in field keywords
  45.     if the result is not empty then
  46.       answer "No match for keyword " "e& holder"e
  47.       pop card
  48.     end if
  49.   end if
  50.   click at 0,0
  51. end mouseUp
  52. On MouseWithin
  53.   if the OptionKey is down then
  54.     if the locktext of the target is true then
  55.       put true into DidUnlock
  56.       set locktext of target to false
  57.     else
  58.       put false into DidUnlock
  59.     end if
  60.     set the cursor to 2
  61.     repeat while (the OptionKey is down) and (item 1 of the rect of target <= item 1 of the mouseLoc) and (item 1 of the mouseLoc <= item 3 of the rect of target) and (item 2 of the rect of target <= item 2 of the mouseLoc) and (item 2 of the mouseLoc <= item 4 of the rect of target)
  62.       if the Mouse is down then
  63.         click at the MouseLoc
  64.         click at the ClickLoc
  65.         if the selection <> empty then
  66.           put the selection into holder
  67.           type holder & "*"
  68.           push card
  69.           find holder in field keywords
  70.           if the result is not empty then
  71.             doMenu New Card
  72.             put holder into field keywords
  73.             set the name of this card to holder
  74.             get the number of lines in card field finder of card theIndex
  75.             put holder into line it+1 of card field finder of card theIndex
  76.           else
  77.             put the length of holder into hl
  78.             put the length of word 1 of field keywords into kl
  79.             if hl<>kl then
  80.               answer "Close match but not exact!" with "Good Enough" or "New Card"
  81.               if it contains "New" then
  82.                 set lockscreen to true
  83.                 go prev
  84.                 doMenu New Card
  85.                 put holder into field keywords
  86.                 set the name of this card to holder
  87.                 get the number of lines in card field finder of card theIndex
  88.                 put holder into line it+1 of card field finder of card theIndex
  89.                 set lockscreen to false
  90.               end if
  91.             end if
  92.           end if
  93.         end if
  94.         if field body is empty then
  95.           type tab
  96.         else
  97.           click at -1,-1
  98.         end if
  99.       end if
  100.     end repeat
  101.     if DidUnlock then
  102.       set the locktext of the target to true
  103.     end if
  104.   end if
  105. end MouseWithin
  106.  
  107.  
  108.  
  109. -- part 44 (button)
  110. -- low flags: 00
  111. -- high flags: 0000
  112. -- rect: left=0 top=253 right=283 bottom=34
  113. -- title width / last selected line: 0
  114. -- icon id / first selected line: 32462 / 32462
  115. -- text alignment: 1
  116. -- font id: 0
  117. -- text size: 12
  118. -- style flags: 0
  119. -- line height: 16
  120. -- part name: ?
  121. ----- HyperTalk script -----
  122. on mouseUp
  123.   set lockscreen to true
  124.   go card ayuda
  125.   set lockscreen to false
  126. end mouseUp
  127.  
  128.  
  129.  
  130. -- part 7 (button)
  131. -- low flags: 00
  132. -- high flags: 0000
  133. -- rect: left=0 top=195 right=225 bottom=34
  134. -- title width / last selected line: 0
  135. -- icon id / first selected line: 29114 / 29114
  136. -- text alignment: 1
  137. -- font id: 0
  138. -- text size: 12
  139. -- style flags: 0
  140. -- line height: 16
  141. -- part name: Back
  142. ----- HyperTalk script -----
  143. on mouseUp
  144.   set lockscreen to true
  145.   if the number of this card = 1 then
  146.     answer "Careful. You might leave this stack." with Cancel or OK
  147.     if it = "OK" then
  148.       go back
  149.     else
  150.       exit mouseup
  151.     end if
  152.   else
  153.     pop card
  154.   end if
  155.   set lockscreen to false
  156. end mouseUp
  157.  
  158.  
  159.  
  160. -- part 8 (button)
  161. -- low flags: 00
  162. -- high flags: 0000
  163. -- rect: left=0 top=166 right=196 bottom=34
  164. -- title width / last selected line: 0
  165. -- icon id / first selected line: 0 / 0
  166. -- text alignment: 1
  167. -- font id: 0
  168. -- text size: 12
  169. -- style flags: 0
  170. -- line height: 16
  171. -- part name: New Stack
  172. ----- HyperTalk script -----
  173. on mouseUp
  174.   set lockscreen to true
  175.   put the short name of this stack into checker
  176.   doMenu New Stack...
  177.   get the short name of this stack
  178.   if it = checker then exit mouseup
  179.   put it into field "keywords"
  180.   push card
  181.   go back
  182.   go to second card
  183.   doMenu "Copy Card"
  184.   pop card
  185.   doMenu "Paste Card"
  186.   push card
  187.   go to first card of stack checker
  188.   doMenu "Copy Card"
  189.   pop card
  190.   go prev
  191.   doMenu "Paste Card"
  192.   set lockscreen to false
  193.   click at the loc of button "Re-Index"
  194. end mouseUp
  195.  
  196.  
  197.  
  198. -- part 9 (button)
  199. -- low flags: 00
  200. -- high flags: 0000
  201. -- rect: left=0 top=282 right=312 bottom=34
  202. -- title width / last selected line: 0
  203. -- icon id / first selected line: 1011 / 1011
  204. -- text alignment: 1
  205. -- font id: 0
  206. -- text size: 12
  207. -- style flags: 0
  208. -- line height: 16
  209. -- part name: Home
  210. ----- HyperTalk script -----
  211. on mouseUp
  212.   visual effect iris close to black
  213.   visual effect iris open to white
  214.   go home
  215. end mouseUp
  216.  
  217.  
  218.  
  219. -- part 12 (button)
  220. -- low flags: 80
  221. -- high flags: 8004
  222. -- rect: left=355 top=72 right=98 bottom=384
  223. -- title width / last selected line: 0
  224. -- icon id / first selected line: 0 / 0
  225. -- text alignment: 1
  226. -- font id: 0
  227. -- text size: 12
  228. -- style flags: 0
  229. -- line height: 16
  230. -- part name: OK
  231. ----- HyperTalk script -----
  232. on mouseUp
  233.   hide bkgnd button OK
  234.   show field body
  235. end mouseUp
  236.  
  237.  
  238.  
  239. -- part 17 (button)
  240. -- low flags: 00
  241. -- high flags: 0000
  242. -- rect: left=0 top=224 right=254 bottom=34
  243. -- title width / last selected line: 0
  244. -- icon id / first selected line: 21449 / 21449
  245. -- text alignment: 1
  246. -- font id: 0
  247. -- text size: 12
  248. -- style flags: 0
  249. -- line height: 16
  250. -- part name: first card
  251. ----- HyperTalk script -----
  252. on mouseUp
  253.   if the number of this card > 1 then
  254.     set lockscreen to true
  255.     go to first card
  256.     set lockscreen to false
  257.   else
  258.     play boing
  259.     answer "You're already at the first card!"
  260.   end if
  261. end mouseUp
  262.  
  263.  
  264.  
  265. -- part 32 (button)
  266. -- low flags: 00
  267. -- high flags: 0000
  268. -- rect: left=0 top=137 right=167 bottom=34
  269. -- title width / last selected line: 0
  270. -- icon id / first selected line: 0 / 0
  271. -- text alignment: 1
  272. -- font id: 0
  273. -- text size: 12
  274. -- style flags: 0
  275. -- line height: 16
  276. -- part name: Import Text
  277. ----- HyperTalk script -----
  278. on mouseUp
  279.   if the number of this card > 2 then
  280.     if field body is empty then
  281.       put FileName("TEXT") into theFile
  282.       if theFile is not empty then
  283.         open file theFile
  284.         read from file theFile for 30000
  285.         put it into bkgnd field body
  286.         close file theFile
  287.       end if
  288.     else
  289.       answer "Import Text: Replace or Add to field contents?" with "Replace" or "Add" or "Cancel"
  290.       if it = "Cancel" then exit mouseup
  291.       if it = "Replace" then
  292.         put FileName("TEXT") into theFile
  293.         if theFile is not empty then
  294.           open file theFile
  295.           read from file theFile for 30000
  296.           put it into bkgnd field body
  297.           close file theFile
  298.         end if
  299.       else
  300.         put return after last line of bkgnd field body
  301.         put FileName("TEXT") into theFile
  302.         if theFile is not empty then
  303.           open file theFile
  304.           read from file theFile for 30000
  305.           put the number of lines in field body into liner
  306.           put it after line liner of bkgnd field body
  307.           close file theFile
  308.         end if
  309.       end if
  310.     end if
  311.   else
  312.     play boing
  313.     Answer "Don't import to Index or Help Card!"
  314.   end if
  315. end mouseUp
  316.  
  317.  
  318.  
  319. -- part 33 (button)
  320. -- low flags: 00
  321. -- high flags: 0000
  322. -- rect: left=0 top=97 right=138 bottom=34
  323. -- title width / last selected line: 0
  324. -- icon id / first selected line: 26884 / 26884
  325. -- text alignment: 1
  326. -- font id: 0
  327. -- text size: 12
  328. -- style flags: 0
  329. -- line height: 16
  330. -- part name: pict
  331. ----- HyperTalk script -----
  332. on mouseUp
  333.   if the number of this card > 2 then
  334.     answer "Change to Picture or Text?" with Text or Picture
  335.     if it contains "Text" then
  336.       show tool window
  337.       choose select tool
  338.       doMenu Select All
  339.       doMenu Clear Picture
  340.       choose browse tool
  341.       hide tool window
  342.       hide pattern window
  343.     else
  344.       show pattern window
  345.       show tool window
  346.       choose rectangle tool
  347.       set filled to false
  348.       drag from (item 1 of the rect of field keywords), (item 2 of the rect of field keywords) to (item 3 of the rect of field keywords), (item 4 of the rect of field keywords)
  349.       drag from 0,28 to 512,342
  350.       choose bucket tool
  351.       set pattern to 1
  352.       click at 250,250
  353.       choose text tool
  354.       set the textfont to Geneva
  355.       set the textsize to 9
  356.       click at 10,320
  357.       type "Don't use eraser. Use white brush instead."
  358.       click at 10,330
  359.       type "Command-Space will toggle the menubar on or off."
  360.       choose brush tool
  361.     end if
  362.   else
  363.     play boing
  364.     answer "Uh-uh. You don't want to change this card."
  365.   end if
  366. end mouseUp
  367.  
  368.  
  369.  
  370. -- part 36 (button)
  371. -- low flags: 00
  372. -- high flags: 0000
  373. -- rect: left=0 top=61 right=98 bottom=34
  374. -- title width / last selected line: 0
  375. -- icon id / first selected line: 1007 / 1007
  376. -- text alignment: 1
  377. -- font id: 0
  378. -- text size: 12
  379. -- style flags: 0
  380. -- line height: 16
  381. -- part name: output
  382. ----- HyperTalk script -----
  383. on mouseUp
  384.   answer "Output to printer or to text file?" with "Printer" or "File" or "Cancel"
  385.   if it = "Cancel" then
  386.     exit mouseup
  387.   else if it = "Printer" then
  388.     answer "Print the stack or a report of its text" with "Stack" or "Report" or "Cancel"
  389.     if it = "Cancel" then
  390.       exit mouseup
  391.     else if it = "Stack" then
  392.       doMenu Print Stack...
  393.     else if it = "Report" then
  394.       doMenu Print Report...
  395.     end if
  396.   else if it = "File" then
  397.     answer "Save a file of the Stack or of this Card?" with "Stack" or "Card" or "Cancel"
  398.     if it = "Cancel" then
  399.       exit mouseup
  400.     else if it = "Stack" then
  401.       put the number of cards into counter
  402.       go to first card
  403.       put the short name of this stack & ".text" into tfilename
  404.       Get PutFile("Save text as:",tfilename)
  405.       if it is empty then exit mouseup
  406.       put it into textfile
  407.       set cursor to 4
  408.       set the loc of message to 10,120
  409.       put "Writing to file " & textfile & ".  Please wait..."into message
  410.       open file textfile
  411.       repeat (counter - 1)
  412.         go next card
  413.         write field keywords to file textfile
  414.         write return to file textfile
  415.         write field body to file textfile
  416.         write return to file textfile
  417.         write return to file textfile
  418.       end repeat
  419.       close file textfile
  420.       go first card
  421.       play harpsichord c e g bb
  422.       flash 1
  423.       put "Done." into message
  424.       wait 2 seconds
  425.       hide message
  426.     else if it = "Card" then
  427.       put the short name of this card & ".text" into tfilename
  428.       Get PutFile("Save text as:",tfilename)
  429.       if it is empty then exit mouseup
  430.       put it into textfile
  431.       open file textfile
  432.       write field keywords to file textfile
  433.       write return to file textfile
  434.       write field body to file textfile
  435.       close file textfile
  436.     end if
  437.   end if
  438. end mouseUp
  439.  
  440.  
  441.  
  442. -- part 45 (field)
  443. -- low flags: 81
  444. -- high flags: 2004
  445. -- rect: left=25 top=49 right=70 bottom=364
  446. -- title width / last selected line: 0
  447. -- icon id / first selected line: 0 / 0
  448. -- text alignment: 0
  449. -- font id: 3
  450. -- text size: 9
  451. -- style flags: 0
  452. -- line height: 12
  453. -- part name: keywords
  454. ----- HyperTalk script -----
  455. on mouseUp
  456.   set cursor to 4
  457.   put field keywords into holder
  458.   put the number of this card into num
  459.   put empty into field inlinks
  460.   put "One moment, Please." into line 2 of field inlinks
  461.   show field inlinkstitle
  462.   show field inlinks
  463.   show bkgnd button "Hide"
  464.   put "What links to " & holder &"?" into field inlinkstitle
  465.   put the number of cards into counter
  466.   set lockscreen to true
  467.   put empty into field inlinks
  468.   put 0 into first_card
  469.   push card
  470.   go card 2
  471.   repeat
  472.     find holder in field body
  473.     if (the result is empty) and (the number of this card is not first_card) then
  474.       if first_card is 0 then put the number of this card into first_card
  475.       if (field "keywords" is not holder) then
  476.         put return after last line of field inlinks of card num
  477.         put field keywords after last line of field inlinks of card num
  478.       end if
  479.       go next
  480.     else
  481.       exit repeat
  482.     end if
  483.   end repeat
  484.   pop card
  485.   play harpsichord
  486.   flash 1
  487.   set lockscreen to false
  488.   click at 0,0
  489.   set lockText of the target to true
  490.   if field inlinks is empty then
  491.     hide field inlinks
  492.     hide field inlinkstitle
  493.     hide bkgnd button Hide
  494.   end if
  495. end mouseUp
  496.  
  497.  
  498.  
  499.  
  500. -- part 41 (field)
  501. -- low flags: 81
  502. -- high flags: 2002
  503. -- rect: left=258 top=32 right=52 bottom=426
  504. -- title width / last selected line: 0
  505. -- icon id / first selected line: 0 / 0
  506. -- text alignment: 1
  507. -- font id: 3
  508. -- text size: 9
  509. -- style flags: 0
  510. -- line height: 12
  511. -- part name: inlinkstitle
  512.  
  513.  
  514. -- part 42 (field)
  515. -- low flags: 81
  516. -- high flags: 2007
  517. -- rect: left=258 top=51 right=114 bottom=426
  518. -- title width / last selected line: 0
  519. -- icon id / first selected line: 0 / 0
  520. -- text alignment: 0
  521. -- font id: 2
  522. -- text size: 9
  523. -- style flags: 0
  524. -- line height: 12
  525. -- part name: inlinks
  526. ----- HyperTalk script -----
  527. on mouseUp
  528.   if the selection is empty then
  529.     set lockText of the target to false
  530.     repeat two times
  531.       click at the clickLoc
  532.     end repeat
  533.     put the selection into holder
  534.     push card
  535.     visual effect wipe right to black
  536.     visual effect wipe left
  537.     find holder in field keywords
  538.     if the result is not empty then
  539.       answer "No match for keyword " "e& holder"e
  540.       pop card
  541.     end if
  542.     click at 0,0
  543.     set lockText of the target to true
  544.   end if
  545. end mouseUp
  546.  
  547.  
  548.  
  549. -- part 43 (button)
  550. -- low flags: 80
  551. -- high flags: 8003
  552. -- rect: left=413 top=37 right=58 bottom=452
  553. -- title width / last selected line: 0
  554. -- icon id / first selected line: 0 / 0
  555. -- text alignment: 1
  556. -- font id: 0
  557. -- text size: 12
  558. -- style flags: 0
  559. -- line height: 16
  560. -- part name: Hide
  561. ----- HyperTalk script -----
  562. on mouseUp
  563.   hide field inlinks
  564.   hide field inlinkstitle
  565.   hide bkgnd button Hide
  566. end mouseUp
  567.  
  568.  
  569.  
  570. -- part 46 (button)
  571. -- low flags: 00
  572. -- high flags: 0000
  573. -- rect: left=437 top=21 right=51 bottom=471
  574. -- title width / last selected line: 0
  575. -- icon id / first selected line: 902 / 902
  576. -- text alignment: 1
  577. -- font id: 0
  578. -- text size: 12
  579. -- style flags: 0
  580. -- line height: 16
  581. -- part name: Back
  582. ----- HyperTalk script -----
  583. on mouseUp
  584.   set lockscreen to true
  585.   go prev
  586.   set lockscreen to false
  587. end mouseUp
  588.  
  589.  
  590.  
  591. -- part 47 (button)
  592. -- low flags: 00
  593. -- high flags: 0000
  594. -- rect: left=474 top=21 right=51 bottom=508
  595. -- title width / last selected line: 0
  596. -- icon id / first selected line: 26425 / 26425
  597. -- text alignment: 1
  598. -- font id: 0
  599. -- text size: 12
  600. -- style flags: 0
  601. -- line height: 16
  602. -- part name: Back
  603. ----- HyperTalk script -----
  604. on mouseUp
  605.   set lockscreen to true
  606.   go next
  607.   set lockscreen to false
  608. end mouseUp
  609.  
  610.